<html>

<head>
    <title>Express</title>

    <link rel="stylesheet" href="/stylesheets/style.css">
</head>

<body>
    <form action="/api/upload" method="post" enctype="multipart/form-data">
        <div>
            用户名：
            <input type="text" name="uid">
        </div>
        <div>
            头像:
            <button type="button" name="selectPic">请选择....</button>
            <input type="file" name="pic" multiple style="display:none">
        </div>
        <div>
            照片：
            <input type="file" name="img" multiple>
        </div>
        <button type="submit">提交</button>
    </form>

    <script>
        const form = document.forms[0];

        form.selectPic.onclick = function () {
            form.pic.click();
        }

        form.pic.onchange = function () {
            form.selectPic.innerHTML = this.value;

        }

    </script>
</body>

</html>